<template>
  <div>
    <h1>组件BCom</h1>
    <h1>{{ $store.state.lele.name }}</h1>
    <h1>{{ $store.state.lele.age }}</h1>
    <button @click="addAge">age+1</button>
  </div>
</template>

<script>
export default {
  mounted() {
    console.log(this.$store);
  },
  methods: {
    addAge() {
      this.$store.commit("addAge");
    },
  },
};
</script>

<style lang="scss" scoped>
</style>